package com.kyivmohyla.kma2.client.events.operator;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIStaff;

public class OperatorLoginEvent extends GwtEvent<OperatorLoginEventHandler> {
    public static Type<OperatorLoginEventHandler> TYPE = new Type<OperatorLoginEventHandler>();
    private final UIStaff operatorStaff;

    public OperatorLoginEvent(UIStaff operatorStaff) {
        this.operatorStaff = operatorStaff;
    }

    public UIStaff getOperatorStaff() {
        return operatorStaff;
    }

    public Type<OperatorLoginEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(OperatorLoginEventHandler handler) {
        handler.onOperatorLogin(this);
    }
}
